package com.qjs.smterp.web.exception;

public class MessageFormat {

	private static final String msgSaveErrorFormat = "The system could not save this record {%s}. May be data duplicated in Database system.";
	
	private static final String msgSaveSuccessFormat="The record {%s} have been saved successfully.";
	
	private static final String msgDelSuccessFormat="The record {%s} have been deleted successfully.";
	
	private static final String msgDelErrorFormat =" The system could not delete this record {%s}.";
	
	public static String getSaveErrorMessage(String msgData){
		String message = String.format(msgSaveErrorFormat, msgData);
		return message;
	}
	
	public static String getSaveInfoMessage(String msgData){
		String message = String.format(msgSaveSuccessFormat, msgData);
		return message;
	}
	
	public static String getDelInfoMessage(String msgData){
		String message = String.format(msgDelSuccessFormat, msgData);
		return message;
	}
	
	public static String getDelErrorMessage(String msgData){
		String message = String.format(msgDelErrorFormat, msgData);
		return message;
	}

}
